import {defineStore} from "pinia";
import type {RouteRecordRaw} from "vue-router";

export const useRouterStore = defineStore("routerList",  {
    state: () => ({ routerList: [] as RouteRecordRaw[] }),
    actions: {
        setRouterList (routes: RouteRecordRaw[]){
            this.routerList = routes
        },
        getRouterList():RouteRecordRaw[] {
            return this.routerList
        }
    },
    persist: true
})